﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class UnityEngineExtention
{

    public static T GetOrAddComponent<T>(this GameObject mb) where T : Component
    {
        var rel = mb.GetComponent<T>();
        if (null == rel)
        {
            rel = mb.AddComponent<T>();
        }
        return rel;
    }
}